

import { request} from '@/utils/request.util';
import type {Response}from '@/types/common';
import type { DrugSignatureResponse,EmpSignatureResponse,EmpInfoResponse} from '@/types/individual'
import type {Res} from '@/types/root'

//个人中心：查询员工个人信息
export const getEmpInfo = ()=> request.get<EmpInfoResponse>("/clinic/emp/getEmpInfo"); 

// 个人中心：员工编辑简介
export const updateNotes = (body:{
  notes: string,
  avatarUrl:string
})=> request.post<Response<Res>>("/clinic/emp/updateNotes",body);

// 个人中心：获取个人签名
export const getEmpSignature = ()=> request.get<EmpSignatureResponse>("/clinic/emp/getEmpSignature");

//个人中心：修改密码
export const updatePassword = (body:{
  oldPassword?: string,
  newPassword: string,
  confirmPassword: string,
})=> request.post<Response<Res>>("/clinic/emp/updatePassword",body);

// 个人中心：修改个人签名
export const updateSignature = (body:{
  signature: string
})=> request.post<Response<Res>>("/clinic/emp/updateSignature",body);


//个人中心：查询药品签名列表
export const getDrugSignatureList = (body:{
  drugName?: any,
  isSignature?: any,
  pageNo: number,
  pageSize: number
})=> request.get<DrugSignatureResponse>("/drug/profile/getDrugSignatureList",{params:body});


//个人中心：修改药品签名
export const profileUpdateSignature = (body:{
  drugId: any,
  signature: string
})=> request.post<Response<Res>>("/drug/profile/updateSignature",body);